; Disassembly of the file "z:\ramdisk\home\knoppix\none\STD_TEST_2K_COBRA_64K.bin"
; 
; CPU Type: Z80
; 
; Using the opcode map file "z:\ramdisk\home\knoppix\none\STD_TEST_2K_COBRA_64K.opmap"
; ; Created with dZ80 2.0
; 
; on Thursday, 16 of May 2013 at 10:13 PM
;
; Lines that must to be modified for this code to run relocated have been marked with ---@@@
; Lines that must to be modified for this code to run
; on both CoBra 64K and CoBra 80K have been marked with ---***
; For CoBra 80K, O6 must be set to 1 before starting this test ROM.
; This is solved if running this ROM from the Boot Manager.
0000           LD      A,$80
0002           LD      R,A
0004           LD      SP,$DFFF	; stack at DFFF
0007           LD      HL,$C000
000A           LD      DE,$C001
000D           LD      BC,$1AFF
0010           LD      (HL),$00
0012           LDIR		; clear screen to black
0014           LD      HL,$D900
0017           LD      BC,$00FF
001A           LD      DE,$D901
001D           LD      (HL),$07
001F           LDIR		; horizontal white line
0021           LD      A,$92
0023           OUT     ($DF),A	; init 8255 ports A & B as input and C as output
0025           LD      A,$40	;					---***0026:40->C0	SO=1 O6=1
0027           OUT     ($FE),A	; 8255 -> set O6=1
0029           LD      BC,$0010
002C           LD      DE,$DA08
002F           LD      HL,$00B4	; 16 byte data block at 00B4		---@@@0031:00->20
0032           LDIR		; write data on screen
0034           LD      HL,$CE8B
0037           CALL    $007A	; fill 10 bytes at CE8B with C=10h	---@@@0039:00->20
003A           LD      HL,$CFAB
003D           CALL    $007A	; fill 10 bytes at CFAB with C=10h	---@@@003F:00->20
0040           LD      DE,$C8AB
0043           PUSH    DE
0044           LD      HL,$00C4	; 6x10 byte data block at 00C4		---@@@0046:00->20
0047           LD      A,$06
0049           CALL    $0082	; copy 10 bytes from 00C4 to C8AB <-|	---@@@004B:00->20
004C           POP     DE	;				    |
004D           INC     D	; and then to C9AB,CAAB,CBAB...	    |
004E           PUSH    DE	;				    |
004F           DEC     A	;				    |
0050           JR      NZ,$0049	; ---> A=6 loops ---> ---> ---> --->|
0052           LD      DE,$C86D
0055           PUSH    DE
0056           LD      HL,$0100	; 8x6 byte data block at 0100		---@@@0058:01->21
0059           LD      A,$08
005B           CALL    $0088	; copy 6 bytes from 0100 to C86D <--|	---@@@005D:00->20
005E           POP     DE	;				    |
005F           INC     D	; and then to C96D,CA6D,CB6D...	    |
0060           PUSH    DE	;				    |
0061           DEC     A	;				    |
0062           JR      NZ,$005B	; ---> A=8 loops ---> ---> ---> --->+
0064           LD      A,$F7	; test kbd line KA11 (1,2,3,4,5) <--+
0066           IN      A,($FE)	;				    |
0068           OR      $C0	; set bits K6,K7 to 1		    |
006A           CP      $FE	; test if "1" pressed (bit K0)	    |
006C           JR      Z,$008E	; if so, load BASIC from ROM	    |
006E           CP      $FD	; test if "2" pressed (bit K1)	    |
0070           JR      Z,$00AD	; if so, load OPUS from ROM	    |
0072           CP      $FB	; test if "3" pressed (bit K2)      |
0074           JP      Z,$0130	; if so, go to hardware tests	    |	---@@@0076:01->21
0077           JP      $0064	; ---> ---> ---> ---> ---> ---> --->|	---@@@0079:00->20
007A           LD      BC,$0AFF
007D           LD      (HL),C
007E           INC     HL
007F           DJNZ    $007D
0081           RET
				; ######## LDIR1 ########
0082           LD      BC,$000A
0085           LDIR
0087           RET
				; ######## LDIR2 ########
0088           LD      BC,$0006
008B           LDIR
008D           RET
				; ######## BASIC loading
008E           LD      HL,$4000
0091           LD      DE,$8000
0094           LD      BC,$2000	;					---***0096:20->40
0097           LDIR
0099           LD      HL,$6000
009C           LD      DE,$E000
009F           LD      BC,$2000
00A2           LDIR
00A4           LD      HL,$0000	; ------- entry point to BASIC cfg
00A7           XOR     A	; A=00
00A8           OUT     ($FE),A	; O6=0
00AA           LD      R,A	; reset R bit 7, change config to BASIC hw cfg
00AC           JP      (HL)	; jump to 0000 in BASIC
00AD           LD      A,$41	; ######## OPUS loading, selection by BORDER bit 0	---***00AE:41->00	SO=0 O6=0
00AF           OUT     ($FE),A	; O6=1, border=blue
00B1           JP      $008E	;					---@@@00B3:00->20
				; ######## DATA BLOCK ########
00B4           DB      $07
00B5           DB      $0E
00B6           DB      $15
00B7           DB      $1C
00B8           DB      $23
00B9           DB      $2A
00BA           DB      $31
00BB           DB      $38
00BC           DB      $38
00BD           DB      $31
00BE           DB      $2A
00BF           DB      $23
00C0           DB      $1C
00C1           DB      $15
00C2           DB      $0E
00C3           DB      $07
00C4           DB      $1F
00C5           DB      $F8
00C6           DB      $1F
00C7           DB      $F8
00C8           DB      $7F
00C9           DB      $F8
00CA           DB      $7F
00CB           DB      $F8
00CC           DB      $1F
00CD           DB      $F8
00CE           DB      $78
00CF           DB      $1E
00D0           DB      $78
00D1           DB      $1E
00D2           DB      $78
00D3           DB      $1E
00D4           DB      $78
00D5           DB      $1E
00D6           DB      $78
00D7           DB      $1E
00D8           DB      $78
00D9           DB      $00
00DA           DB      $78
00DB           DB      $1E
00DC           DB      $7F
00DD           DB      $F8
00DE           DB      $78
00DF           DB      $1E
00E0           DB      $78
00E1           DB      $1E
00E2           DB      $78
00E3           DB      $00
00E4           DB      $78
00E5           DB      $1E
00E6           DB      $78
00E7           DB      $1E
00E8           DB      $7F
00E9           DB      $F8
00EA           DB      $7F
00EB           DB      $FE
00EC           DB      $78
00ED           DB      $1E
00EE           DB      $78
00EF           DB      $1E
00F0           DB      $78
00F1           DB      $1E
00F2           DB      $78
00F3           DB      $78
00F4           DB      $78
00F5           DB      $1E
00F6           DB      $1F
00F7           DB      $F8
00F8           DB      $1F
00F9           DB      $F8
00FA           DB      $7F
00FB           DB      $F8
00FC           DB      $78
00FD           DB      $1E
00FE           DB      $78
00FF           DB      $1E
0100           DB      $00
0101           DB      $00
0102           DB      $01
0103           DB      $80
0104           DB      $00
0105           DB      $00
0106           DB      $00
0107           DB      $00
0108           DB      $01
0109           DB      $80
010A           DB      $00
010B           DB      $00
010C           DB      $00
010D           DB      $3F
010E           DB      $F9
010F           DB      $9F
0110           DB      $FC
0111           DB      $00
0112           DB      $01
0113           DB      $FF
0114           DB      $F9
0115           DB      $9F
0116           DB      $FF
0117           DB      $80
0118           DB      $03
0119           DB      $E0
011A           DB      $01
011B           DB      $80
011C           DB      $07
011D           DB      $C0
011E           DB      $03
011F           DB      $E0
0120           DB      $01
0121           DB      $80
0122           DB      $07
0123           DB      $C0
0124           DB      $01
0125           DB      $FF
0126           DB      $F9
0127           DB      $9F
0128           DB      $FF
0129           DB      $80
012A           DB      $00
012B           DB      $3F
012C           DB      $F9
012D           DB      $9F
012E           DB      $FC
012F           DB      $00
				; ######### HARDWARE TESTS ##########
0130           LD      HL,$8000
0133           LD      DE,$8001
0136           LD      (HL),$FF
0138           LD      BC,$07FF
013B           LDIR		; fill addr range 8000-8800 with FF
013D           LD      HL,$032A	;					---@@@013F:03->23
0140           LD      DE,$8000
0143           LD      BC,$041E
0146           LDIR		; copy 41Eh bytes from 032A-0747 to 8000-841E (code block #1)
0148           LD      HL,$0748	;					---@@@014A:07->27
014B           LD      DE,$8500
014E           LD      BC,$0088
0151           LDIR		; copy  88h bytes from 0748-07CF to 8500-8587 (data block #2)
0153           LD      HL,$07D0	;					---@@@0155:07->27
0156           LD      DE,$8600
0159           LD      BC,$0030
015C           LDIR		; copy  30h bytes from 07D0-07FF to 8600-862F (data block #3)
015E           JP      $00A4	; change to BASIC hardware config	---@@@0160:00->20

0161           DB      $FF	; ######## EMPTY SPACE ########
0162           DB      $FF
0163           DB      $FF
0164           DB      $FF
0165           DB      $FF
0166           DB      $FF
0167           DB      $FF
0168           DB      $FF
0169           DB      $FF
016A           DB      $FF
016B           DB      $FF
016C           DB      $FF
016D           DB      $FF
016E           DB      $FF
016F           DB      $FF
0170           DB      $FF
0171           DB      $FF
0172           DB      $FF
0173           DB      $FF
0174           DB      $FF
0175           DB      $FF
0176           DB      $FF
0177           DB      $FF
0178           DB      $FF
0179           DB      $FF
017A           DB      $FF
017B           DB      $FF
017C           DB      $FF
017D           DB      $FF
017E           DB      $FF
017F           DB      $FF
0180           DB      $FF
0181           DB      $FF
0182           DB      $FF
0183           DB      $FF
0184           DB      $FF
0185           DB      $FF
0186           DB      $FF
0187           DB      $FF
0188           DB      $FF
0189           DB      $FF
018A           DB      $FF
018B           DB      $FF
018C           DB      $FF
018D           DB      $FF
018E           DB      $FF
018F           DB      $FF
0190           DB      $FF
0191           DB      $FF
0192           DB      $FF
0193           DB      $FF
0194           DB      $FF
0195           DB      $FF
0196           DB      $FF
0197           DB      $FF
0198           DB      $FF
0199           DB      $FF
019A           DB      $FF
019B           DB      $FF
019C           DB      $FF
019D           DB      $FF
019E           DB      $FF
019F           DB      $FF
01A0           DB      $FF
01A1           DB      $FF
01A2           DB      $FF
01A3           DB      $FF
01A4           DB      $FF
01A5           DB      $FF
01A6           DB      $FF
01A7           DB      $FF
01A8           DB      $FF
01A9           DB      $FF
01AA           DB      $FF
01AB           DB      $FF
01AC           DB      $FF
01AD           DB      $FF
01AE           DB      $FF
01AF           DB      $FF
01B0           DB      $FF
01B1           DB      $FF
01B2           DB      $FF
01B3           DB      $FF
01B4           DB      $FF
01B5           DB      $FF
01B6           DB      $FF
01B7           DB      $FF
01B8           DB      $FF
01B9           DB      $FF
01BA           DB      $FF
01BB           DB      $FF
01BC           DB      $FF
01BD           DB      $FF
01BE           DB      $FF
01BF           DB      $FF
01C0           DB      $FF
01C1           DB      $FF
01C2           DB      $FF
01C3           DB      $FF
01C4           DB      $FF
01C5           DB      $FF
01C6           DB      $FF
01C7           DB      $FF
01C8           DB      $FF
01C9           DB      $FF
01CA           DB      $FF
01CB           DB      $FF
01CC           DB      $FF
01CD           DB      $FF
01CE           DB      $FF
01CF           DB      $FF
01D0           DB      $FF
01D1           DB      $FF
01D2           DB      $FF
01D3           DB      $FF
01D4           DB      $FF
01D5           DB      $FF
01D6           DB      $FF
01D7           DB      $FF
01D8           DB      $FF
01D9           DB      $FF
01DA           DB      $FF
01DB           DB      $FF
01DC           DB      $FF
01DD           DB      $FF
01DE           DB      $FF
01DF           DB      $FF
01E0           DB      $FF
01E1           DB      $FF
01E2           DB      $FF
01E3           DB      $FF
01E4           DB      $FF
01E5           DB      $FF
01E6           DB      $FF
01E7           DB      $FF
01E8           DB      $FF
01E9           DB      $FF
01EA           DB      $FF
01EB           DB      $FF
01EC           DB      $FF
01ED           DB      $FF
01EE           DB      $FF
01EF           DB      $FF
01F0           DB      $FF
01F1           DB      $FF
01F2           DB      $FF
01F3           DB      $FF
01F4           DB      $FF
01F5           DB      $FF
01F6           DB      $FF
01F7           DB      $FF
01F8           DB      $FF
01F9           DB      $FF
01FA           DB      $FF
01FB           DB      $FF
01FC           DB      $FF
01FD           DB      $FF
01FE           DB      $FF
01FF           DB      $FF
0200           DB      $FF
0201           DB      $FF
0202           DB      $FF
0203           DB      $FF
0204           DB      $FF
0205           DB      $FF
0206           DB      $FF
0207           DB      $FF
0208           DB      $FF
0209           DB      $FF
020A           DB      $FF
020B           DB      $FF
020C           DB      $FF
020D           DB      $FF
020E           DB      $FF
020F           DB      $FF
0210           DB      $FF
0211           DB      $FF
0212           DB      $FF
0213           DB      $FF
0214           DB      $FF
0215           DB      $FF
0216           DB      $FF
0217           DB      $FF
0218           DB      $FF
0219           DB      $FF
021A           DB      $FF
021B           DB      $FF
021C           DB      $FF
021D           DB      $FF
021E           DB      $FF
021F           DB      $FF
0220           DB      $FF
0221           DB      $FF
0222           DB      $FF
0223           DB      $FF
0224           DB      $FF
0225           DB      $FF
0226           DB      $FF
0227           DB      $FF
0228           DB      $FF
0229           DB      $FF
022A           DB      $FF
022B           DB      $FF
022C           DB      $FF
022D           DB      $FF
022E           DB      $FF
022F           DB      $FF
0230           DB      $FF
0231           DB      $FF
0232           DB      $FF
0233           DB      $FF
0234           DB      $FF
0235           DB      $FF
0236           DB      $FF
0237           DB      $FF
0238           DB      $FF
0239           DB      $FF
023A           DB      $FF
023B           DB      $FF
023C           DB      $FF
023D           DB      $FF
023E           DB      $FF
023F           DB      $FF
0240           DB      $FF
0241           DB      $FF
0242           DB      $FF
0243           DB      $FF
0244           DB      $FF
0245           DB      $FF
0246           DB      $FF
0247           DB      $FF
0248           DB      $FF
0249           DB      $FF
024A           DB      $FF
024B           DB      $FF
024C           DB      $FF
024D           DB      $FF
024E           DB      $FF
024F           DB      $FF
0250           DB      $FF
0251           DB      $FF
0252           DB      $FF
0253           DB      $FF
0254           DB      $FF
0255           DB      $FF
0256           DB      $FF
0257           DB      $FF
0258           DB      $FF
0259           DB      $FF
025A           DB      $FF
025B           DB      $FF
025C           DB      $FF
025D           DB      $FF
025E           DB      $FF
025F           DB      $FF
0260           DB      $FF
0261           DB      $FF
0262           DB      $FF
0263           DB      $FF
0264           DB      $FF
0265           DB      $FF
0266           DB      $FF
0267           DB      $FF
0268           DB      $FF
0269           DB      $FF
026A           DB      $FF
026B           DB      $FF
026C           DB      $FF
026D           DB      $FF
026E           DB      $FF
026F           DB      $FF
0270           DB      $FF
0271           DB      $FF
0272           DB      $FF
0273           DB      $FF
0274           DB      $FF
0275           DB      $FF
0276           DB      $FF
0277           DB      $FF
0278           DB      $FF
0279           DB      $FF
027A           DB      $FF
027B           DB      $FF
027C           DB      $FF
027D           DB      $FF
027E           DB      $FF
027F           DB      $FF
0280           DB      $FF
0281           DB      $FF
0282           DB      $FF
0283           DB      $FF
0284           DB      $FF
0285           DB      $FF
0286           DB      $FF
0287           DB      $FF
0288           DB      $FF
0289           DB      $FF
028A           DB      $FF
028B           DB      $FF
028C           DB      $FF
028D           DB      $FF
028E           DB      $FF
028F           DB      $FF
0290           DB      $FF
0291           DB      $FF
0292           DB      $FF
0293           DB      $FF
0294           DB      $FF
0295           DB      $FF
0296           DB      $FF
0297           DB      $FF
0298           DB      $FF
0299           DB      $FF
029A           DB      $FF
029B           DB      $FF
029C           DB      $FF
029D           DB      $FF
029E           DB      $FF
029F           DB      $FF
02A0           DB      $FF
02A1           DB      $FF
02A2           DB      $FF
02A3           DB      $FF
02A4           DB      $FF
02A5           DB      $FF
02A6           DB      $FF
02A7           DB      $FF
02A8           DB      $FF
02A9           DB      $FF
02AA           DB      $FF
02AB           DB      $FF
02AC           DB      $FF
02AD           DB      $FF
02AE           DB      $FF
02AF           DB      $FF
02B0           DB      $FF
02B1           DB      $FF
02B2           DB      $FF
02B3           DB      $FF
02B4           DB      $FF
02B5           DB      $FF
02B6           DB      $FF
02B7           DB      $FF
02B8           DB      $FF
02B9           DB      $FF
02BA           DB      $FF
02BB           DB      $FF
02BC           DB      $FF
02BD           DB      $FF
02BE           DB      $FF
02BF           DB      $FF
02C0           DB      $FF
02C1           DB      $FF
02C2           DB      $FF
02C3           DB      $FF
02C4           DB      $FF
02C5           DB      $FF
02C6           DB      $FF
02C7           DB      $FF
02C8           DB      $FF
02C9           DB      $FF
02CA           DB      $FF
02CB           DB      $FF
02CC           DB      $FF
02CD           DB      $FF
02CE           DB      $FF
02CF           DB      $FF
02D0           DB      $FF
02D1           DB      $FF
02D2           DB      $FF
02D3           DB      $FF
02D4           DB      $FF
02D5           DB      $FF
02D6           DB      $FF
02D7           DB      $FF
02D8           DB      $FF
02D9           DB      $FF
02DA           DB      $FF
02DB           DB      $FF
02DC           DB      $FF
02DD           DB      $FF
02DE           DB      $FF
02DF           DB      $FF
02E0           DB      $FF
02E1           DB      $FF
02E2           DB      $FF
02E3           DB      $FF
02E4           DB      $FF
02E5           DB      $FF
02E6           DB      $FF
02E7           DB      $FF
02E8           DB      $FF
02E9           DB      $FF
02EA           DB      $FF
02EB           DB      $FF
02EC           DB      $FF
02ED           DB      $FF
02EE           DB      $FF
02EF           DB      $FF
02F0           DB      $FF
02F1           DB      $FF
02F2           DB      $FF
02F3           DB      $FF
02F4           DB      $FF
02F5           DB      $FF
02F6           DB      $FF
02F7           DB      $FF
02F8           DB      $FF
02F9           DB      $FF
02FA           DB      $FF
02FB           DB      $FF
02FC           DB      $FF
02FD           DB      $FF
02FE           DB      $FF
02FF           DB      $FF
0300           DB      $FF
0301           DB      $FF
0302           DB      $FF
0303           DB      $FF
0304           DB      $FF
0305           DB      $FF
0306           DB      $FF
0307           DB      $FF
0308           DB      $FF
0309           DB      $FF
030A           DB      $FF
030B           DB      $FF
030C           DB      $FF
030D           DB      $FF
030E           DB      $FF
030F           DB      $FF
0310           DB      $FF
0311           DB      $FF
0312           DB      $FF
0313           DB      $FF
0314           DB      $FF
0315           DB      $FF
0316           DB      $FF
0317           DB      $FF
0318           DB      $FF
0319           DB      $FF
031A           DB      $FF
031B           DB      $FF
031C           DB      $FF
031D           DB      $FF
031E           DB      $FF
031F           DB      $FF
0320           DB      $FF
0321           DB      $FF
0322           DB      $FF
0323           DB      $FF
0324           DB      $FF
0325           DB      $FF
0326           DB      $FF
0327           DB      $FF
0328           DB      $FF
0329           DB      $FF
				; ############# code block #1 ###############
032A           DI
032B           XOR     A
032C           JR      Z,$0330
032E           JR      $032E
0330           JR      NZ,$032E
0332           JP      P,$000D
0335           JR      $032E
0337           JP      M,$0004
033A           JP      PE,$0015
033D           JR      $032E
033F           JP      PO,$0004
0342           JR      NC,$0346
0344           JR      $032E
0346           JR      C,$032E
0348           CCF
0349           JR      C,$034D
034B           JR      $032E
034D           JR      NC,$032E
034F           LD      A,$80
0351           AND     A
0352           JR      NZ,$0356
0354           JR      $032E
0356           JR      Z,$032E
0358           JP      M,$0033
035B           JR      $032E
035D           JP      P,$0004
0360           JR      $0366
0362           RET

0363           RST     $38
0364           RST     $38
0365           RST     $38
0366           JP      PO,$0041
0369           JR      $032E
036B           JP      PE,$0004
036E           LD      C,$07
0370           LD      HL,$4000
0373           LD      (HL),C
0374           INC     HL
0375           LD      A,H
0376           CP      $5B
0378           JR      NZ,$0373
037A           LD      HL,$4000
037D           LD      BC,$00FF
0380           DJNZ    $0380
0382           LD      (HL),C
0383           INC     HL
0384           LD      A,H
0385           CP      $58
0387           JR      NZ,$0380
0389           LD      HL,$4000
038C           LD      BC,$0000
038F           DJNZ    $038F
0391           LD      (HL),C
0392           INC     HL
0393           LD      A,H
0394           CP      $58
0396           JR      NZ,$038F
0398           LD      C,$00
039A           LD      HL,$5B00
039D           LD      (HL),C
039E           LD      A,(HL)
039F           CP      C
03A0           JR      NZ,$032E
03A2           INC     HL
03A3           LD      A,H
03A4           CP      $80
03A6           JR      NZ,$039D
03A8           LD      C,$FF
03AA           LD      HL,$5F00
03AD           LD      (HL),C
03AE           LD      A,(HL)
03AF           CP      C
03B0           JP      NZ,$0004
03B3           INC     HL
03B4           LD      A,H
03B5           CP      $80
03B7           JR      NZ,$03AD
03B9           LD      SP,$5C00
03BC           CALL    $03D2
03BF           LD      HL,$58E0
03C2           LD      C,$0F
03C4           LD      (HL),C
03C5           INC     HL
03C6           LD      A,H
03C7           CP      $5A
03C9           JR      NZ,$03C4
03CB           CALL    $03F4
03CE           CP      $00
03D0           JR      Z,$03E9
03D2           PUSH    AF
03D3           LD      H,$59
03D5           LD      D,$05
03D7           LD      B,$28
03D9           LD      E,B
03DA           DEC     E
03DB           LD      A,(DE)
03DC           LD      L,A
03DD           LD      (HL),$1F
03DF           DJNZ    $03D9
03E1           POP     AF
03E2           LD      E,A
03E3           LD      A,(DE)
03E4           LD      L,A
03E5           LD      (HL),$3F
03E7           JR      $03CB
03E9           CALL    $03D2
03EC           LD      B,$18
03EE           PUSH    BC
03EF           PUSH    BC
03F0           LD      B,$20
03F2           POP     AF
03F3           INC     A
03F4           PUSH    AF
03F5           CALL    $0394
03F8           DJNZ    $03F2
03FA           POP     AF
03FB           CALL    $01B3
03FE           POP     BC
03FF           DJNZ    $03EE
0401           CALL    $0416
0404           CP      $5A
0406           JR      NZ,$0401
0408           CALL    $03D2
040B           XOR     A
040C           LD      HL,$5800
040F           LD      B,$18
0411           LD      C,A
0412           PUSH    BC
0413           LD      DE,$0628
0416           LD      B,$08
0418           LD      A,(DE)
0419           INC     DE
041A           OR      C
041B           LD      (HL),A
041C           INC     HL
041D           LD      (HL),A
041E           INC     HL
041F           LD      (HL),A
0420           INC     HL
0421           LD      (HL),A
0422           INC     HL
0423           DJNZ    $0418
0425           POP     BC
0426           DJNZ    $0412
0428           CALL    $0416
042B           CP      $58
042D           JR      Z,$043F
042F           CP      $30
0431           JP      M,$00FE
0434           CP      $33
0436           JP      P,$00FE
0439           AND     $03
043B           RRCA
043C           RRCA
043D           JR      $040F
043F           LD      HL,$5B03
0442           LD      (HL),$80
0444           INC     HL
0445           LD      (HL),$B0
0447           CALL    $0416
044A           PUSH    AF
044B           CALL    $03D2
044E           CALL    $035B
0451           POP     AF
0452           CP      $31
0454           JR      Z,$047D
0456           CP      $32
0458           JR      Z,$047D
045A           CP      $41
045C           JP      Z,$020C
045F           CP      $42
0461           JR      Z,$0492
0463           CP      $47
0465           JP      Z,$0280
0468           CP      $50
046A           JR      Z,$04E7
046C           CP      $53
046E           JP      Z,$024D
0471           CP      $57
0473           JP      Z,$02C0
0476           CP      $49
0478           JP      Z,$02E7
047B           JR      $0447
047D           AND     $03
047F           PUSH    AF
0480           CALL    $038B
0483           POP     AF
0484           RRCA
0485           RRCA
0486           OR      $80
0488           LD      HL,$5B03
048B           LD      (HL),A
048C           ADD     A,$40
048E           INC     HL
048F           LD      (HL),A
0490           JR      $0447
0492           LD      C,$00
0494           CALL    $0186
0497           LD      C,$01
0499           CALL    $0186
049C           RLC     C
049E           JR      NC,$0499
04A0           LD      C,$FE
04A2           CALL    $0186
04A5           RLC     C
04A7           JR      C,$04A2
04A9           LD      C,$FF
04AB           CALL    $0186
04AE           JR      $0447
04B0           CALL    $0346
04B3           LD      (HL),C
04B4           LD      A,(HL)
04B5           XOR     C
04B6           CALL    NZ,$0373
04B9           INC     HL
04BA           DEC     DE
04BB           LD      A,D
04BC           OR      E
04BD           JR      NZ,$04B3
04BF           PUSH    BC
04C0           LD      B,$08
04C2           LD      HL,$5B06
04C5           LD      A,(HL)
04C6           CALL    $038B
04C9           INC     HL
04CA           LD      A,(HL)
04CB           CALL    $038B
04CE           INC     HL
04CF           LD      A,($5B02)
04D2           XOR     $FF
04D4           LD      ($5B02),A
04D7           DJNZ    $04C5
04D9           CALL    $035B
04DC           POP     BC
04DD           LD      HL,$5B01
04E0           LD      (HL),$00
04E2           LD      HL,$5B00
04E5           INC     (HL)
04E6           RET

04E7           LD      BC,$00FF
04EA           CALL    $01CC
04ED           LD      BC,$FF00
04F0           CALL    $01CC
04F3           JP      $011D
04F6           CALL    $0350
04F9           LD      A,($5B03)
04FC           LD      D,A
04FD           LD      E,$00
04FF           LD      A,C
0500           LD      (DE),A
0501           LD      H,$0F
0503           LD      L,$80
0505           PUSH    HL
0506           LD      H,D
0507           LD      L,E
0508           EX      (SP),HL
0509           DEC     H
050A           JR      Z,$0528
050C           LD      A,L
050D           RLCA
050E           LD      L,A
050F           LD      A,H
0510           SUB     $07
0512           LD      A,L
0513           EX      (SP),HL
0514           JR      C,$051A
0516           XOR     L
0517           LD      L,A
0518           JR      $051C
051A           XOR     H
051B           LD      H,A
051C           LD      A,(HL)
051D           XOR     B
051E           CALL    NZ,$0373
0521           LD      A,(DE)
0522           XOR     C
0523           CALL    NZ,$0373
0526           JR      $0508
0528           POP     HL
0529           LD      A,B
052A           LD      (DE),A
052B           INC     DE
052C           LD      A,($5B04)
052F           CP      D
0530           JR      NZ,$04FF
0532           CALL    $0195
0535           RET

0536           LD      HL,$8000
0539           LD      D,H
053A           LD      E,L
053B           LD      (HL),H
053C           INC     HL
053D           DEC     DE
053E           LD      A,D
053F           OR      E
0540           JR      NZ,$053B
0542           LD      HL,$8000
0545           LD      D,H
0546           LD      E,L
0547           LD      A,(HL)
0548           XOR     H
0549           CALL    NZ,$0373
054C           INC     HL
054D           DEC     DE
054E           LD      A,D
054F           OR      E
0550           JR      NZ,$0547
0552           CALL    $0195
0555           LD      HL,$8000
0558           LD      D,H
0559           LD      E,L
055A           LD      (HL),L
055B           INC     HL
055C           DEC     DE
055D           LD      A,D
055E           OR      E
055F           JR      NZ,$055A
0561           LD      HL,$8000
0564           LD      D,H
0565           LD      E,L
0566           LD      A,(HL)
0567           XOR     L
0568           CALL    NZ,$0373
056B           INC     HL
056C           DEC     DE
056D           LD      A,D
056E           OR      E
056F           JR      NZ,$0566
0571           CALL    $0195
0574           JP      $011D
0577           LD      B,$00
0579           CALL    $025A
057C           LD      B,$FF
057E           CALL    $025A
0581           JP      $011D
0584           CALL    $0350
0587           LD      A,($5B03)
058A           LD      H,A
058B           LD      L,$00
058D           LD      A,B
058E           CPL
058F           LD      (HL),A
0590           CALL    $0346
0593           LD      A,(HL)
0594           INC     HL
0595           DEC     DE
0596           LD      A,D
0597           OR      E
0598           JR      NZ,$0593
059A           LD      A,($5B03)
059D           LD      H,A
059E           LD      L,$00
05A0           LD      A,(HL)
05A1           CPL
05A2           XOR     B
05A3           CALL    NZ,$0373
05A6           CALL    $0195
05A9           RET

05AA           LD      BC,$00FF
05AD           CALL    $028F
05B0           LD      BC,$FF00
05B3           CALL    $028F
05B6           JP      $011D
05B9           CALL    $0350
05BC           LD      A,($5B03)
05BF           LD      H,A
05C0           LD      L,$00
05C2           LD      A,($5B03)
05C5           LD      D,A
05C6           LD      E,$00
05C8           LD      (HL),C
05C9           LD      A,(DE)
05CA           XOR     B
05CB           CALL    NZ,$0366
05CE           LD      A,(HL)
05CF           CALL    NZ,$0373
05D2           INC     E
05D3           JR      NZ,$05C9
05D5           INC     D
05D6           LD      A,($5B04)
05D9           CP      D
05DA           JR      NZ,$05C9
05DC           LD      (HL),B
05DD           INC     L
05DE           JR      NZ,$05C2
05E0           INC     H
05E1           LD      A,($5B04)
05E4           CP      H
05E5           JR      NZ,$05C2
05E7           JP      $0195
05EA           LD      B,$13
05EC           CALL    $0350
05EF           LD      DE,$0000
05F2           LD      A,($5B04)
05F5           LD      H,A
05F6           LD      L,$00
05F8           DEC     HL
05F9           LD      (HL),$C9
05FB           LD      HL,$02DC
05FE           PUSH    HL
05FF           LD      A,($5B03)
0602           LD      H,A
0603           LD      L,$00
0605           JP      (HL)
0606           LD      A,D
0607           CALL    $038B
060A           LD      A,E
060B           CALL    $038B
060E           JP      $011D
0611           CALL    $03D2
0614           LD      HL,$0000
0617           PUSH    HL
0618           LD      DE,$0800
061B           EX      (SP),HL
061C           LD      C,(HL)
061D           INC     HL
061E           DEC     DE
061F           EX      (SP),HL
0620           LD      B,$08
0622           RLC     C
0624           SBC     A,A
0625           PUSH    BC
0626           LD      B,A
0627           LD      A,L
0628           AND     $40
062A           SUB     $01
062C           SBC     A,A
062D           XOR     B
062E           LD      B,A
062F           LD      A,H
0630           AND     $01
0632           SUB     $01
0634           SBC     A,A
0635           XOR     B
0636           LD      B,A
0637           LD      A,H
0638           AND     $08
063A           SUB     $01
063C           SBC     A,A
063D           XOR     B
063E           LD      B,A
063F           LD      A,H
0640           AND     $80
0642           SUB     $01
0644           SBC     A,A
0645           XOR     B
0646           RLCA
0647           RL      L
0649           RL      H
064B           POP     BC
064C           DJNZ    $0622
064E           LD      A,E
064F           OR      D
0650           JR      NZ,$061B
0652           LD      A,H
0653           CALL    $038B
0656           LD      A,L
0657           CALL    $038B
065A           LD      A,($5B02)
065D           XOR     $FF
065F           LD      ($5B02),A
0662           LD      HL,$0000
0665           EX      (SP),HL
0666           LD      A,H
0667           EX      (SP),HL
0668           CP      $40
066A           JR      NZ,$0618
066C           POP     HL
066D           JP      $011D
0670           LD      A,($5B03)
0673           LD      H,A
0674           LD      L,$00
0676           LD      DE,$4000
0679           RET

067A           CALL    $0346
067D           LD      (HL),B
067E           INC     HL
067F           DEC     DE
0680           LD      A,D
0681           OR      E
0682           JR      NZ,$067D
0684           RET

0685           LD      HL,$5B06
0688           LD      B,$10
068A           XOR     A
068B           LD      (HL),A
068C           INC     HL
068D           DJNZ    $068B
068F           RET

0690           LD      ($5B05),A
0693           LD      A,E
0694           CP      L
0695           JR      NZ,$069A
0697           LD      A,D
0698           CP      H
0699           RET     Z

069A           LD      A,($5B05)
069D           LD      IX,$5B06
06A1           LD      B,$08
06A3           RRA
06A4           JR      NC,$06AE
06A6           INC     (IX+$01)
06A9           JR      NZ,$06AE
06AB           INC     (IX+$00)
06AE           INC     IX
06B0           INC     IX
06B2           DJNZ    $06A3
06B4           RET

06B5           PUSH    AF
06B6           RRA
06B7           RRA
06B8           RRA
06B9           RRA
06BA           CALL    $0394
06BD           POP     AF
06BE           PUSH    HL
06BF           PUSH    DE
06C0           PUSH    BC
06C1           LD      HL,$0528
06C4           LD      DE,$0006
06C7           AND     $0F
06C9           JR      Z,$06CF
06CB           LD      B,A
06CC           ADD     HL,DE
06CD           DJNZ    $06CC
06CF           PUSH    HL
06D0           LD      A,($5B00)
06D3           LD      D,A
06D4           AND     $07
06D6           RRCA
06D7           RRCA
06D8           RRCA
06D9           LD      E,A
06DA           LD      A,($5B01)
06DD           OR      E
06DE           LD      L,A
06DF           LD      A,D
06E0           AND     $58
06E2           LD      H,A
06E3           POP     DE
06E4           LD      A,($5B02)
06E7           LD      C,A
06E8           LD      (HL),C
06E9           INC     H
06EA           LD      B,$06
06EC           LD      A,(DE)
06ED           XOR     C
06EE           LD      (HL),A
06EF           INC     H
06F0           INC     DE
06F1           DJNZ    $06EC
06F3           LD      (HL),C
06F4           LD      HL,$5B01
06F7           INC     (HL)
06F8           POP     BC
06F9           POP     DE
06FA           POP     HL
06FB           RET

06FC           LD      HL,$4000
06FF           LD      C,$00
0701           LD      (HL),C
0702           INC     HL
0703           LD      A,H
0704           CP      $58
0706           JR      NZ,$0701
0708           LD      C,$07
070A           LD      (HL),C
070B           INC     HL
070C           LD      A,H
070D           CP      $5B
070F           JR      NZ,$070A
0711           XOR     A
0712           LD      ($5B01),A
0715           LD      ($5B02),A
0718           LD      A,$40
071A           LD      ($5B00),A
071D           RET

071E           PUSH    BC
071F           LD      BC,$7FFE
0722           IN      A,(C)
0724           CPL
0725           AND     $1F
0727           JR      NZ,$072D
0729           RRC     B
072B           JR      $0722
072D           LD      C,A
072E           XOR     A
072F           RRC     B
0731           JR      NC,$0737
0733           ADD     A,$05
0735           JR      $072F
0737           RRC     C
0739           JR      C,$073E
073B           INC     A
073C           JR      $0737
073E           POP     BC
073F           RET

0740           CALL    $03F4
0743           LD      H,$06
0745           LD      L,A
0746           LD      A,(HL)
0747           RET
				; ############# data block #2 ###############
0748           DB      $C2
0749           DB      $C5
074A           DB      $C8
074B           DB      $CB
074C           DB      $CE
074D           DB      $83
074E           DB      $86
074F           DB      $89
0750           DB      $8C
0751           DB      $8F
0752           DB      $42
0753           DB      $45
0754           DB      $48
0755           DB      $4B
0756           DB      $4E
0757           DB      $01
0758           DB      $04
0759           DB      $07
075A           DB      $0A
075B           DB      $0D
075C           DB      $1C
075D           DB      $19
075E           DB      $16
075F           DB      $13
0760           DB      $10
0761           DB      $5D
0762           DB      $5A
0763           DB      $57
0764           DB      $54
0765           DB      $51
0766           DB      $9E
0767           DB      $9B
0768           DB      $98
0769           DB      $95
076A           DB      $92
076B           DB      $DD
076C           DB      $DA
076D           DB      $D7
076E           DB      $D4
076F           DB      $D1
0770           DB      $3C
0771           DB      $46
0772           DB      $4A
0773           DB      $52
0774           DB      $62
0775           DB      $3C
0776           DB      $08
0777           DB      $18
0778           DB      $08
0779           DB      $08
077A           DB      $08
077B           DB      $1C
077C           DB      $3C
077D           DB      $42
077E           DB      $04
077F           DB      $18
0780           DB      $20
0781           DB      $7E
0782           DB      $38
0783           DB      $44
0784           DB      $08
0785           DB      $04
0786           DB      $42
0787           DB      $3C
0788           DB      $04
0789           DB      $08
078A           DB      $10
078B           DB      $24
078C           DB      $7E
078D           DB      $04
078E           DB      $7E
078F           DB      $40
0790           DB      $7C
0791           DB      $02
0792           DB      $42
0793           DB      $3C
0794           DB      $3C
0795           DB      $42
0796           DB      $40
0797           DB      $7C
0798           DB      $42
0799           DB      $3C
079A           DB      $7E
079B           DB      $02
079C           DB      $04
079D           DB      $08
079E           DB      $10
079F           DB      $10
07A0           DB      $3C
07A1           DB      $42
07A2           DB      $3C
07A3           DB      $42
07A4           DB      $42
07A5           DB      $3C
07A6           DB      $3C
07A7           DB      $42
07A8           DB      $3E
07A9           DB      $02
07AA           DB      $42
07AB           DB      $3C
07AC           DB      $3C
07AD           DB      $42
07AE           DB      $42
07AF           DB      $42
07B0           DB      $7E
07B1           DB      $42
07B2           DB      $7C
07B3           DB      $42
07B4           DB      $7C
07B5           DB      $42
07B6           DB      $42
07B7           DB      $7C
07B8           DB      $3C
07B9           DB      $42
07BA           DB      $40
07BB           DB      $40
07BC           DB      $42
07BD           DB      $3C
07BE           DB      $7C
07BF           DB      $42
07C0           DB      $42
07C1           DB      $42
07C2           DB      $42
07C3           DB      $7C
07C4           DB      $7E
07C5           DB      $40
07C6           DB      $78
07C7           DB      $40
07C8           DB      $40
07C9           DB      $7E
07CA           DB      $7E
07CB           DB      $40
07CC           DB      $40
07CD           DB      $78
07CE           DB      $40
07CF           DB      $40
				; ############# data block #3 ###############
07D0           DB      $00
07D1           DB      $5A
07D2           DB      $58
07D3           DB      $43
07D4           DB      $56
07D5           DB      $41
07D6           DB      $53
07D7           DB      $44
07D8           DB      $46
07D9           DB      $47
07DA           DB      $51
07DB           DB      $57
07DC           DB      $45
07DD           DB      $52
07DE           DB      $54
07DF           DB      $31
07E0           DB      $32
07E1           DB      $33
07E2           DB      $34
07E3           DB      $35
07E4           DB      $30
07E5           DB      $39
07E6           DB      $38
07E7           DB      $37
07E8           DB      $36
07E9           DB      $50
07EA           DB      $4F
07EB           DB      $49
07EC           DB      $55
07ED           DB      $59
07EE           DB      $0D
07EF           DB      $4C
07F0           DB      $4B
07F1           DB      $4A
07F2           DB      $48
07F3           DB      $20
07F4           DB      $00
07F5           DB      $4D
07F6           DB      $4E
07F7           DB      $42
07F8           DB      $38
07F9           DB      $31
07FA           DB      $2A
07FB           DB      $23
07FC           DB      $1C
07FD           DB      $15
07FE           DB      $0E
07FF           DB      $07
